package com.casic.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: tzy-sc-workspace
 * @description: 模拟共享配置信息使用
 * @author: Tan_sir
 * @create: 2021-03-08 14:56
 **/
@RestController
@RequestMapping("/config")
@RefreshScope
public class ConfigController {


    /*@Value("${tzy.message}")
    private String tzyMessage;
    @Value("${mysql.url}")
    private String mysqlUrl;*/



    @GetMapping("/viewConfig")
    public String viewConfig() {
        return "tzyMessage + mysqlUrl";
    }


}

